<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <title>Package signup Form a Responsive Widget Template :: w3layouts</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstrap.min.css">
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="${pageContext.request.contextPath}/static/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="${pageContext.request.contextPath}/static/bootstrap.min.js"></script>
</head>
<body>
<br>
<c:if test="${isUpdate== null}">
    <form class="form-horizontal" style="width:80%;" action="/comment/addComment?currentPage=1&pageSize=5" method="post">
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">评论内容</label>
            <div class="col-sm-10">
                <textarea required style="height: 300px" name="content" class="form-control" id="inputEmail3"  placeholder="评论内容"></textarea>
                <%--<input type="text" style="height: 300px" name="content" class="form-control" id="inputEmail3" placeholder="评论内容">--%>
            </div>
        </div>
        <%--<div class="form-group">--%>
            <%--<div class="col-sm-offset-2 col-sm-10">--%>
                <%--<div class="checkbox">--%>
                    <%--<label>--%>
                        <%--<input type="radio" value="user" name="parentType">user--%>
                        <%--<input type="radio" value="news" name="parentType">news--%>
                        <%--<input type="radio" value="comment" name="parentType">comment--%>
                    <%--</label>--%>
                <%--</div>--%>
            <%--</div>--%>
        <%--</div>--%>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <div class="checkbox">
                    <label>
                        <%--<input type="radio" value="disabled" name="status"> 删除--%>
                        <input type="radio" checked value="enabled" name="status"> 正常
                    </label>
                </div>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default" style="width: 100px">添加</button>
            </div>
        </div>
    </form>
</c:if>

<c:if test="${isUpdate != null}">
    <form class="form-horizontal" style="width:80%;" action="/comment/updateComment?currentPage=1&pageSize=5" method="post">
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">评论内容</label>
            <div class="col-sm-10">
                <%--<input type="text" style="height: 300px" name="content" value="${comment.content}" class="form-control" id="inputEmail4" >--%>
                <textarea required style="height: 300px" name="content" class="form-control" id="inputEmail4" >${comment.content}</textarea>
                <input type="hidden" name="commentId" value="${comment.commentId}">
            </div>
        </div>
        <%--<div class="form-group">--%>
            <%--<div class="col-sm-offset-2 col-sm-10">--%>
                <%--<div class="checkbox">--%>
                    <%--<label>--%>
                        <%--<c:if test="${comment.parentType=='user'}">--%>
                            <%--<input type="radio" value="user" name="parentType" checked> user--%>
                            <%--<input type="radio" value="news" name="parentType"> news--%>
                            <%--<input type="radio" value="comment" name="parentType"> comment--%>
                        <%--</c:if>--%>
                        <%--<c:if test="${comment.parentType=='news'}">--%>
                            <%--<input type="radio" value="user" name="parentType"> user--%>
                            <%--<input type="radio" value="news" name="parentType" checked> news--%>
                            <%--<input type="radio" value="comment" name="parentType"> comment--%>
                        <%--</c:if>--%>
                        <%--<c:if test="${comment.parentType=='comment'}">--%>
                            <%--<input type="radio" value="user" name="parentType"> user--%>
                            <%--<input type="radio" value="news" name="parentType"> news--%>
                            <%--<input type="radio" value="comment" name="parentType" checked> comment--%>
                        <%--</c:if>--%>

                    <%--</label>--%>
                <%--</div>--%>
            <%--</div>--%>
        <%--</div>--%>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <div class="checkbox">
                    <label>
                        <c:if test="${comment.status=='disabled'}">
                            <input type="radio" value="disabled" name="status" checked> 禁用
                            <input type="radio" value="enabled" name="status"> 正常
                        </c:if>
                        <c:if test="${comment.status=='enabled'}">
                            <input type="radio" value="disabled" name="status"> 禁用
                            <input type="radio" value="enabled" name="status" checked> 正常
                        </c:if>

                    </label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default" style="width: 100px">修改</button>
            </div>
        </div>
    </form>
</c:if>
<br>

</body>
</html>